//
//  bulidCulbController.m
//  PaiQuan
//
//  Created by Mac on 16/7/11.
//  Copyright © 2016年 huigu. All rights reserved.
//

#import "bulidCulbController.h"

@interface bulidCulbController ()
@property(nonatomic,strong)UILabel *bulidMyLabel;
@property(nonatomic,strong)UILabel *AlreadybulidMyLabel;
@property(nonatomic,strong)UILabel *clubNameLabel;
@property(nonatomic,strong)UIImageView *ImgView;

@property(nonatomic,strong)UITextField *clubNameTF;
@property(nonatomic,strong)UILabel *synopsisLabel;
@property(nonatomic,strong)UITextField *synopsisTF;
@property(nonatomic,assign)NSInteger totalNum;
@property(nonatomic,assign)NSInteger alreadyNum;

@property(nonatomic,strong)UIButton *buildBtn;
@end

@implementation bulidCulbController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUPNav];
    [self setUPUI];
    [self setUPCon];
    
}
-(void)setUPUI{
    [self.view addSubview:self.bulidMyLabel];
    [self.view addSubview:self.ImgView];
    [self.view addSubview:self.AlreadybulidMyLabel];
    [self.view addSubview:self.clubNameLabel];
    [self.view addSubview:self.clubNameTF];
    [self.view addSubview:self.synopsisLabel];
    [self.view addSubview:self.synopsisTF];
    [self.view addSubview:self.buildBtn];
    
}
-(void)setUPCon{
    [self.bulidMyLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.titleView.bottom).offset(RATIO(83));
        make.centerX.equalTo(self.view);
        
    }];
    [self.ImgView makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.titleView.bottom).offset(RATIO(150));
         make.centerX.equalTo(self.view);
        make.width.height.equalTo(RATIO(300));
    }];
    [self.AlreadybulidMyLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.ImgView.bottom).offset(RATIO(36));
        make.centerX.equalTo(self.view);
     
        

    }];
    [self.clubNameLabel makeConstraints:^(MASConstraintMaker *make) {
           make.top.equalTo(self.titleView.bottom).offset(RATIO(562));
        make.left.equalTo(self.view.left).offset(RATIO(92));
        
    }];
    [self.clubNameTF makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.clubNameLabel.bottom).offset(RATIO(28));
        make.width.equalTo(RATIO(562));
        make.height.equalTo(RATIO(72));
        make.centerX.equalTo(self.view);
    }];
    [self.synopsisLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.clubNameTF.bottom).offset(RATIO(28));
        make.left.equalTo(self.clubNameTF.left);
        
    }];
    [self.synopsisTF makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.synopsisLabel.bottom).offset(RATIO(28));
        make.width.equalTo(RATIO(562));
        make.height.equalTo(RATIO(72));
        make.centerX.equalTo(self.view);
    }];
    [self.buildBtn makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.synopsisTF.bottom).offset(RATIO(56));
        make.centerX.equalTo(self.view);
        make.width.equalTo(RATIO(500));
        make.height.equalTo(RATIO(72));
    }];
}
-(void)setUPNav{
    self.titleView.title = @" 新建俱乐部";
    [self.titleView.btnBack setImage:PQIMG(@"back") forState:UIControlStateNormal];
    [self.titleView.btnBack setTitle:@"返回" forState:UIControlStateNormal];
    [self.titleView.btnBack setTitleColor:PQ_COLOR_YELLOW forState:UIControlStateNormal];
//    self.navigationController.title = @"新建俱乐部";
//    UIButton *
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark --懒加载
-(UILabel*)bulidMyLabel{
    if (!_bulidMyLabel) {
        _bulidMyLabel = [[UILabel alloc] init];
        [_bulidMyLabel setTextColor:PQ_COLOR_SimpleGary];
        [_bulidMyLabel setFont:FONT(16)];
        [_bulidMyLabel setText:@"建立属于我的俱乐部"];
        
        
    }
    return _bulidMyLabel;
    
    
    
}
-(UILabel*) AlreadybulidMyLabel{
    if (! _AlreadybulidMyLabel) {
        _AlreadybulidMyLabel = [[UILabel alloc] init];
        [_AlreadybulidMyLabel setTextColor:PQ_COLOR_SimpleGary];
        [_AlreadybulidMyLabel setFont:FONT(16)];
        self.alreadyNum = 1;
        self.totalNum = 4;
        [_AlreadybulidMyLabel setText:[NSString stringWithFormat:@"已建立俱乐部数%ld/%ld",self.alreadyNum,self.totalNum]];
        
        
    }
    return _AlreadybulidMyLabel;
    
    
    
}
-(UILabel*) clubNameLabel{
    if (! _clubNameLabel) {
        _clubNameLabel = [[UILabel alloc] init];
        [_clubNameLabel setTextColor:PQ_COLOR_SimpleGary];
        [_clubNameLabel setFont:FONT(16)];
        [_clubNameLabel setText:@"俱乐部名称"];
        
        
    }
    return _clubNameLabel;
    
    
    
}
-(UILabel*) synopsisLabel{
    if (! _synopsisLabel) {
        _synopsisLabel = [[UILabel alloc] init];
        [_synopsisLabel setTextColor:PQ_COLOR_SimpleGary];
        [_synopsisLabel setFont:FONT(16)];
        [_synopsisLabel setText:@"俱乐部简介"];
        
        
    }
    return _synopsisLabel;
    
    
    
}
-(UITextField*) clubNameTF{
    if (! _clubNameTF) {
        _clubNameTF = [[UITextField alloc] init];
        [_clubNameTF setPlaceholder:[NSString stringWithFormat:@"1-10个字符"]];
        _clubNameTF.backgroundColor = [UIColor whiteColor];
        _clubNameTF.layer.cornerRadius = 4;
        _clubNameTF.layer.masksToBounds = YES;
      
        
        
        
    }
    return _clubNameTF;
    
    
    
}
-(UITextField*) synopsisTF{
    if (! _synopsisTF) {
        _synopsisTF = [[UITextField alloc] init];
        [_synopsisTF setPlaceholder:[NSString stringWithFormat:@"1-50个字符"]];
        _synopsisTF.backgroundColor = [UIColor whiteColor];
        _synopsisTF.layer.cornerRadius = 4;
        _synopsisTF.layer.masksToBounds = YES;
        
        
        
        
    }
    return _synopsisTF;
    
    
    
}
  -(UIImageView *)ImgView
{
    if (!_ImgView) {
        _ImgView = [[UIImageView alloc] init];
        _ImgView.backgroundColor = [UIColor redColor];
        _ImgView.image =PQIMG(@"04");
    }
    return _ImgView;
    
    
}
-(UIButton*)buildBtn{
    if (!_buildBtn) {
        _buildBtn = [[UIButton alloc] init];
        [_buildBtn setTitle:@"建立俱乐部" forState:UIControlStateNormal];
        [_buildBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [_buildBtn setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted];
        _buildBtn.backgroundColor =PQ_COLOR_YELLOW;
        _buildBtn.titleLabel.font = FONT(17);
        _buildBtn.layer.cornerRadius = RATIO(8);
        _buildBtn.layer.masksToBounds = YES;
        [_buildBtn addTarget:self action:@selector(buildBtnDidClick) forControlEvents:UIControlEventTouchUpInside];
        
    }
    return _buildBtn;
    
}
#pragma mark --按钮的点击事件
-(void)buildBtnDidClick{
    
    
    
}

@end
